<?php
class pm extends spController
{
	function getmessages(){
		$username = $this -> spArgs("$username");
		$hash = $this -> spArgs("hash");
	}
	
	function postmessages(){
		$username = $this -> spArgs("$username");
		$touser = $this -> spArgs("touser");
		$hash = $this -> spArgs("hash");
		$content = $this -> spArgs("content");
		
		$conditions1 = array('hash' => $hash);
		$conditions2 = array('username' => $touser);
		$users = spClass("users");
		$checksender = $users -> find($conditions1,"hash","username");
		$checksender = $checksender["username"];
		$checkreceiver = $users -> find($conditions2,"username","username");
		$checkreceiver = $checkreceiver["username"];
		

		if($checksender == $username)
		{
			
		}
		else
		{
			
		}
		
		
	}
}